<template>
  <div class="mb-4">
    <el-button @click="showMessage">Default</el-button>
    <!-- <el-button @click="goToUserRegister" type="primary">Primary</el-button>
    <router-link to="/user/register">UserRegister</router-link> -->
    <el-button type="success">Success</el-button>
    <el-button type="info">Info</el-button>
    <el-button type="warning">Warning</el-button>
    <el-button type="danger">Danger</el-button>
  </div>
</template>

<script>
import { ElMessage } from 'element-plus'
import router from '@/router/index'

export default {
  methods: {
    showMessage: () => {
      console.log("按下了")
      ElMessage.info("INFO 消息")
    },
    goToUserRegister: () => {
      router.push({ name: 'UserRegister' })
      // this.$router.push('/user/register')
    }
  },
  mounted() {
    console.log('欢迎页');
  }

}
</script>
